import type {App} from 'vue';
import {createI18n} from "vue-i18n";

import en from './en.json'
import zhCN from './zhCN.json'

const i18n = createI18n({
    locale: 'zhCN',
    legacy: false,
    globalInjection: true,
    messages: {
        en: {
            ...en
        },
        zhCN: {
            ...zhCN
        }
    }
})

export const setI18n = (app: App) => {
    app.use(i18n);
}

export default i18n;
